/**
 * Tencent is pleased to support the open source community by making Tseer available.
 *
 * Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved.
 * 
 * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * https://opensource.org/licenses/BSD-3-Clause
 *
 * Unless required by applicable law or agreed to in writing, software distributed 
 * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations under the License.
 */

// **********************************************************************
// This file was generated by a TARS parser!
// TARS version 1.0.1.
// **********************************************************************

package com.qq.cloud.router.client.share.tseer;

import com.qq.tars.protocol.util.*;
import com.qq.tars.protocol.annotation.*;
import com.qq.tars.protocol.tars.*;
import com.qq.tars.protocol.tars.annotation.*;

@TarsStruct
public class AgentRouterResponse {

	@TarsStructProperty(order = 1, isRequire = false)
	public int getType = 0;
	@TarsStructProperty(order = 2, isRequire = false)
	public String obj = "";
	@TarsStructProperty(order = 3, isRequire = false)
	public String setname = "";
	@TarsStructProperty(order = 4, isRequire = false)
	public java.util.List<RouterNodeInfo> resultList = null;
	@TarsStructProperty(order = 5, isRequire = false)
	public int expireInterval = 60;

	public int getGetType() {
		return getType;
	}

	public void setGetType(int getType) {
		this.getType = getType;
	}

	public String getObj() {
		return obj;
	}

	public void setObj(String obj) {
		this.obj = obj;
	}

	public String getSetname() {
		return setname;
	}

	public void setSetname(String setname) {
		this.setname = setname;
	}

	public java.util.List<RouterNodeInfo> getResultList() {
		return resultList;
	}

	public void setResultList(java.util.List<RouterNodeInfo> resultList) {
		this.resultList = resultList;
	}

	public int getExpireInterval() {
		return expireInterval;
	}

	public void setExpireInterval(int expireInterval) {
		this.expireInterval = expireInterval;
	}

	public AgentRouterResponse() {
	}

	public AgentRouterResponse(int getType, String obj, String setname, java.util.List<RouterNodeInfo> resultList, int expireInterval) {
		this.getType = getType;
		this.obj = obj;
		this.setname = setname;
		this.resultList = resultList;
		this.expireInterval = expireInterval;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + TarsUtil.hashCode(getType);
		result = prime * result + TarsUtil.hashCode(obj);
		result = prime * result + TarsUtil.hashCode(setname);
		result = prime * result + TarsUtil.hashCode(resultList);
		result = prime * result + TarsUtil.hashCode(expireInterval);
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (!(obj instanceof AgentRouterResponse)) {
			return false;
		}
		AgentRouterResponse other = (AgentRouterResponse) obj;
		return (
			TarsUtil.equals(getType, other.getType) &&
			TarsUtil.equals(obj, other.obj) &&
			TarsUtil.equals(setname, other.setname) &&
			TarsUtil.equals(resultList, other.resultList) &&
			TarsUtil.equals(expireInterval, other.expireInterval) 
		);
	}

	public void writeTo(TarsOutputStream _os) {
		_os.write(getType, 1);
		if (null != obj) {
			_os.write(obj, 2);
		}
		if (null != setname) {
			_os.write(setname, 3);
		}
		if (null != resultList) {
			_os.write(resultList, 4);
		}
		_os.write(expireInterval, 5);
	}

	public void readFrom(TarsInputStream _is) {
		this.getType = (int) _is.read(getType, 1, false);
		this.obj = _is.read(obj, 2, false);
		this.setname = _is.read(setname, 3, false);
		this.resultList = (java.util.List<RouterNodeInfo>) _is.read(resultList, 4, false);
		this.expireInterval = _is.read(expireInterval, 5, false);
	}

}
